package com.yuanfeng.order.controller;


import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName OrderInvoiceTemplateInfoController
 * @Description  发票模版管理表
 * @Author cyp
 * @Date 2023-07-04 13:32:32
 * @Version 1.0
 **/
@RestController
@RequestMapping("order/invoiceTemplateInfo")
public class OrderInvoiceTemplateInfoController extends BaseController {

    /***
     * 查询发票信息列表
     * @param param
     * @return
     */
    @PostMapping("/list")
    public ResponseResult queryInvoiceInfoList(@RequestBody Map<String,Object> param) {
        ResponseResult result = orderInvoiceTemplateInfoService.queryInvoiceInfoList(param);
        return result;
    }

    /**
     * 插入发票模版信息
     * @param param
     * @return
     */
    @PostMapping("/insert")
    public ResponseResult insertInvoiceTmp(@RequestBody Map<String,Object> param) {
        ResponseResult result = orderInvoiceTemplateInfoService.insertInvoiceTmp(param);
        return result;
    }

    /**
     * 删除发票模版信息
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/delete")
    public ResponseResult deleteInvoiceTmp(@RequestBody Map<String, Object> param) {
        ResponseResult result = orderInvoiceTemplateInfoService.deleteInvoiceTmp(param);
        return result;
    }

    /**
     * 查询发票模版信息
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/query")
    public ResponseResult queryInvoiceTmp(@RequestBody Map<String, Object> param) {
        ResponseResult result = orderInvoiceTemplateInfoService.queryInvoiceTmp(param);
        return result;
    }

    /**
     * 更新发票模版信息
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/update")
    public ResponseResult updateInvoiceTmp(@RequestBody Map<String, Object> param) {
        ResponseResult result = orderInvoiceTemplateInfoService.updateInvoiceTmp(param);
        return result;
    }

}
